﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PartComponent : MonoBehaviour
{
    public Vector2 pos = new Vector2();
    public float num = 0;
    
    private void OnEnable()
    {
        GetComponent<Rigidbody2D>().AddForce(pos);
        GetComponent<Rigidbody2D>().AddTorque(num);
        StartCoroutine(Wait());
    }
    
    IEnumerator Wait()
    {
        yield return new WaitForSeconds(2.5f);
        gameObject.SetActive(false);
    }
}
